namespace B.S.Domain.Dto.AICustomerServiceDTO
{
    /// <summary>
    /// 知识库创建DTO
    /// </summary>
    public class KnowledgeCreateDTO
    {
        /// <summary>
        /// 问题标题
        /// </summary>
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 问题内容
        /// </summary>
        public string Question { get; set; } = string.Empty;

        /// <summary>
        /// 标准答案
        /// </summary>
        public string Answer { get; set; } = string.Empty;

        /// <summary>
        /// 问题分类
        /// </summary>
        public string Category { get; set; } = string.Empty;

        /// <summary>
        /// 标签
        /// </summary>
        public string? Tags { get; set; }

        /// <summary>
        /// 优先级
        /// </summary>
        public int Priority { get; set; } = 1;

        /// <summary>
        /// 匹配度阈值
        /// </summary>
        public decimal MatchThreshold { get; set; } = 0.7m;

        /// <summary>
        /// 相关链接
        /// </summary>
        public string? RelatedLinks { get; set; }
    }

    /// <summary>
    /// 知识库响应DTO
    /// </summary>
    public class KnowledgeResponseDTO
    {
        /// <summary>
        /// 知识库ID
        /// </summary>
        public int KnowledgeId { get; set; }

        /// <summary>
        /// 问题标题
        /// </summary>
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 问题内容
        /// </summary>
        public string Question { get; set; } = string.Empty;

        /// <summary>
        /// 标准答案
        /// </summary>
        public string Answer { get; set; } = string.Empty;

        /// <summary>
        /// 问题分类
        /// </summary>
        public string Category { get; set; } = string.Empty;

        /// <summary>
        /// 标签
        /// </summary>
        public string? Tags { get; set; }

        /// <summary>
        /// 优先级
        /// </summary>
        public int Priority { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; }

        /// <summary>
        /// 使用次数
        /// </summary>
        public int UsageCount { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 最后使用时间
        /// </summary>
        public DateTime? LastUsedTime { get; set; }
    }

    /// <summary>
    /// 知识库查询DTO
    /// </summary>
    public class KnowledgeQueryDTO
    {
        /// <summary>
        /// 搜索关键词
        /// </summary>
        public string? Keyword { get; set; }

        /// <summary>
        /// 分类筛选
        /// </summary>
        public string? Category { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool? IsEnabled { get; set; }

        /// <summary>
        /// 页码
        /// </summary>
        public int PageIndex { get; set; } = 1;

        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; } = 20;
    }
}
